package com.kystar.muxplayer.model;

public class PVWConfig {

    private Layer[] mLayers;
    private int currentPreset;
    private int effectType;
    private int effectDuration;
    // 0: PVW/PGM互换  1:PVW复制PGM
    private boolean takeCopy;

    public Layer[] getLayers() {
        return mLayers;
    }

    public void setLayers(Layer[] layers) {
        mLayers = layers;
    }

    public int getCurrentPreset() {
        return currentPreset;
    }

    public void setCurrentPreset(int currentPreset) {
        this.currentPreset = currentPreset;
    }

    public int getEffectType() {
        return effectType;
    }

    public void setEffectType(int effectType) {
        this.effectType = effectType;
    }

    public int getEffectDuration() {
        return effectDuration;
    }

    public void setEffectDuration(int effectDuration) {
        this.effectDuration = effectDuration;
    }

    public boolean isTakeCopy() {
        return takeCopy;
    }

    public void setTakeCopy(boolean takeCopy) {
        this.takeCopy = takeCopy;
    }

    public void setLayer(Layer layer) {
        if (mLayers!=null) {
            mLayers[layer.getLayerType().ordinal()] = layer;
        }
    }
    public void update(PVWConfig config) {
        currentPreset = config.currentPreset;
        effectType = config.effectType;
    }
}
